<style>
.pli-wrapper {
    padding: 70px 0;
}
.pli-content {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: flex-start;
}
.pli-left {
    width: 350px;
    padding-right: 50px;
}
.pli-left img.radius{
  border-radius: 50%;
  overflow: hidden;
}
.pli-right {
    width: calc(100% - 350px);
}
.pli-r-name {
    font-size: 40px;
    padding-bottom: 8px;
    font-weight: 600;
    border-bottom: 2px solid;
    padding-bottom: 12px;
}
.pli-r-text {
    font-size: 16px;
    padding: 20px 40px 20px 0;
    color: #000;
    line-height: 1.4;
}
.pli-r-text strong{
    padding-bottom: 15px;
    display: inline-block;
}
.pli-r-title {
    font-size: 23px;
    line-height: 1.5;
    letter-spacing: 1px;
    font-weight: 600;
}
.pli-r-ul {
    display: flex;
    align-items: flex-start;
    margin: 30px 0;
}
.pli-r-li {
    width: 28%;
    text-align: center;
}
.pli-r-li img {
    width: 100px;
    border-radius: 50%;
    display: block;
    margin: 0 auto;
}
.pli-r-li span{
    margin-top: 10px;
    font-size: 16px;
    font-weight: bold;
    line-height: 1.2;
    letter-spacing: 1px;
    text-align: center;
    text-transform: uppercase;
    display: block;
    padding: 10px 20px;
}
.pli-r-dt {
    display: flex;
    width: 100%;
    justify-content: space-between;
    padding-bottom: 10px;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 2px solid;
    cursor: pointer;
    padding-right: 8px;
}
.pli-r-dd {
    padding-top: 20px;
    padding-right: 10px;
    line-height: 1.4;
    font-size: 16px;
    color: #000;
}
.pli-r-btn {
    margin-top: 20px;
}
.pli-r-btn a {
    border: none;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 1.6px;
    color: #ffffff;
    padding: 15px 102px;
    text-transform: uppercase;
    margin-top: 30px;
    position: relative;
    z-index: 0;
    transition: all 0.3s ease-in-out;
    border-radius: 50px;
    display: inline-block;
}
.pli-r-dd{
  display: none;
}
.pli-r-dt.open~.pli-r-dd{
  display:block;
}
.pli-r-btn a span{
  position: relative;
  z-index: 1;
}
.pli-r-btn a:before{
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: #ffffff;
  border: none;
  transform: scaleX(0);
  transition: transform 0.5s cubic-bezier(0.7, 0, 0.3, 1);
  transform-origin: right center;
  z-index: -1;
  border-radius: 50px;
}  
.pli-r-btn a:hover:before{
  transform: scaleX(1);
  -webkit-transform: scaleX(1);
  -moz-transform: scaleX(1);
  transform-origin: left center;
  -webkit-transform-origin: left center;
  -moz-transform-origin: left center;
}
@media(min-width:768px){
  .pli-row-reverse .pli-content {
      flex-flow: row-reverse;
  }
}
@media(max-width:768px){
  .pli-content {
      flex-flow: column;
      align-items: center;
  }
  .pli-left {
      width: 275px;
      padding-right: 0;
  }
  .pli-right {
      width: 100%;
      padding: 0 20px;
  }
  .pli-r-name {
      font-size: 27px;
      padding-top: 40px;
  }
  .pli-r-text {
      font-size: 14px;
      padding: 20px 0px;
      line-height: 1.2;
  }
  .pli-r-title {
      font-size: 16px;
  }
  .pli-r-li {
      width: 33.33%;
  }
  .pli-r-li img {
      width: 100%;
      padding: 0 15px;
  }
  .pli-r-li span {
      font-size: 12px;
      padding: 6px 10px;
  }
  .pli-r-dt{
      font-size: 20px;
  }
  .pli-r-dd {
      line-height: 1.2;
      font-size: 14px;
  }
  .pli-r-btn {
      margin-top: 0;
      text-align: center;
  }
  .pli-wrapper {
      padding: 40px 0;
  }
  .pli-r-dt span.pli-jiahao {
      font-size: 28px;
      line-height: 18px;
  }
}
</style>

<div class="pli-main">
    {% for block in section.blocks %}
    {% assign listClass = 'pli-loop-' | append: forloop.index  %}
    <style>
      .{{listClass}} .pli-r-name,.{{listClass}} .pli-r-title,.{{listClass}} .pli-r-li span,.{{listClass}} .pli-r-dt,.{{listClass}} .pli-r-text strong{color:{{ block.settings.color }};}
      .{{listClass}} .pli-r-btn a{background:{{ block.settings.color }};}
      .{{listClass}} .pli-r-btn a:hover{color:{{ block.settings.color }};}
      .{{listClass}} .pli-r-dt,.{{listClass}} .pli-r-name{border-color: {{ block.settings.color }};}
    </style>
    <div class="pli-wrapper {{ listClass }} {% if block.settings.overturn %}pli-row-reverse{%endif%}" style="background: {{ block.settings.bg }};">
        <div class="pli-content">
            <div class="pli-left">
              {% if block.settings.picture %}
                <img class="{% if block.settings.radius %}radius{%endif%}" src="{{ block.settings.picture | img_url: 'master' }}" alt="{{ block.settings.picture.alt | escape }}" />
              {% endif %}
            </div>
            <div class="pli-right">
                <div class="pli-r-name">{{ block.settings.d_name }}</div>
                <div class="pli-r-text">{{ block.settings.describe1 }}</div>
                <div class="pli-r-title">{{ block.settings.d_title }}</div>
                <div class="pli-r-ul">
                    {% if block.settings.icon1 %}
                    <div class="pli-r-li">
                        <img src="{{ block.settings.icon1 | img_url: 'master' }}" alt="{{ block.settings.icon1.alt | escape }}" />
                        <span>{{ block.settings.d_text1 }}</span>
                    </div>
                    {% endif %}
                  
                    {% if block.settings.icon2 %}
                    <div class="pli-r-li">
                        <img src="{{ block.settings.icon2 | img_url: 'master' }}" alt="{{ block.settings.icon2.alt | escape }}" />
                        <span>{{ block.settings.d_text2 }}</span>
                    </div>
                    {% endif %}
                  
                    {% if block.settings.icon3 %}
                    <div class="pli-r-li">
                        <img src="{{ block.settings.icon3 | img_url: 'master' }}" alt="{{ block.settings.icon3.alt | escape }}" />
                        <span>{{ block.settings.d_text3 }}</span>
                    </div>
                    {% endif %}
                  
                </div>

                {% if block.settings.learn_more !='' %}
                <div class="pli-r-dl">
                    <div class="pli-r-dt">
                      <span class="pli-r-dt-text">LEARN MORE</span>
                      <span class="pli-jiahao">+</span>
                    </div>
                    <div class="pli-r-dd">{{ block.settings.learn_more }}</div>
                </div>
                {% endif %}         
                
                {% if block.settings.link %}
                <div class="pli-r-btn">
                    <a href="{{ block.settings.link }}">
                      <span>{{ block.settings.btn }}</span>
                    </a>
                </div>
                {% endif %}
            </div>
        </div>
    </div>
    {% endfor %}  
</div>
<script>
$(document).on("click",".pli-r-dt",function(){  
    if(!$(this).hasClass('open')){
      $(this).addClass('open');
    }else{
      $(this).removeClass('open');
    }
});
</script>
{% schema %}
{
  "name": "page页 - CMS 列表",  
  "class":"ddpro-details-swiper",
  "settings": [
  ],
  "blocks": [
    {
      "type": "style",
      "name": "图文模块",
      "settings": [
        {
          "type": "checkbox",
          "id": "overturn",
          "label": "开启翻转",
          "default": false
        },
        {
          "type": "color",
          "id": "bg",
          "label": "背景颜色",
          "default": "#fff"
        },
        {
          "type": "color",
          "id": "color",
          "label": "主题颜色",
          "default": "#f37490"
        },
  	    {
          "type": "image_picker",
          "id": "picture",
          "label": "模块主图"
        },
        {
          "type": "checkbox",
          "id": "radius",
          "label": "开启图片圆角",
          "default": true
        },
  	    {
          "type": "text",
          "id": "d_name",
          "label": "模块名字"
        },
  	    {
          "type": "richtext",
          "id": "describe1",
          "label": "上方描述"
        },
  	    {
          "type": "text",
          "id": "d_title",
          "label": "模块标题"
        },
  	    {
          "type": "image_picker",
          "id": "icon1",
          "label": "亮点图标 1"
        },
  	    {
          "type": "text",
          "id": "d_text1",
          "label": "亮点文案 1"
        },
  	    {
          "type": "image_picker",
          "id": "icon2",
          "label": "亮点图标 2"
        },
  	    {
          "type": "text",
          "id": "d_text2",
          "label": "亮点文案 2"
        },
  	    {
          "type": "image_picker",
          "id": "icon3",
          "label": "亮点图标 3"
        },
  	    {
          "type": "text",
          "id": "d_text3",
          "label": "亮点文案 3"
        },
  	    {
          "type": "richtext",
          "id": "learn_more",
          "label": "了解更多"
        },
        {
          "type": "text",
          "id": "btn",
          "label": "按钮文案",
          "default": "Shop Now"
        },
        {
          "type": "url",
          "id": "link",
          "label": "按钮链接"
        }
      ]
    }
  ]
}
{% endschema %}
